package com.xiyoukt.springboot.service;

import lombok.Cleanup;
import lombok.SneakyThrows;
import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.java.Log;
import lombok.extern.log4j.Log4j;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.logging.Logger;

/**
 * Description: springboot
 * ********************************************************
 * *                                                      *
 * *                     xiyoukt.com                      *
 * *          西游课堂 - Java程序猿的在线学习课堂          *
 * *                                                      *
 * ********************************************************
 * Created by xiyoukt on 2018/9/23 18:44
 */
//@Log
@Slf4j(topic = "l")
//@CommonsLog
//@Log4j
//@Log4j2
public class UserService {

    @SneakyThrows(RuntimeException.class)
    public void readFile(){
        try {
            log.info("");
            @Cleanup("close") InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream("c;/ss"));
            System.out.println("读取成功");
//            inputStreamReader.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
